/**
 * Created by UPENDERREDDY on 1/5/2015.
 */
var timeoutID;

function delayedAlert() {
    timeoutID = window.setTimeout(slowAlert, 2000);
}

function slowAlert() {
    alert("alert was really slow!");
}

function clearAlert() {
    window.clearTimeout(timeoutID);
}